package aop.aopXMl;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author： pang-yun
 * @date： 2021-12-02 10:42
 * 功能目的 ：用于
 */

public class AopXmlTest {
    public static void main(String[] args) {
//        AnnotationConfigApplicationContext annotation = new AnnotationConfigApplicationContext("aop");
//        Solider solider = annotation.getBean("solider", Solider.class);


//        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("aop.xml");
//        Solider solider = context.getBean("solider", Solider.class);
//        solider.battle();


        // 完全注解开发
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("aop");
        Solider solider = context.getBean("solider", Solider.class);
        solider.battle();
    }
}
